-- GENERATED SPELL FOR [Ana'thek the Cruel] --


function spell0_1059(pUnit, Event) --@Execute,n/a--
pUnit:FullCastSpellOnTarget(7160,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1059', 0, 1)
end

function spell1_1059(pUnit, Event) --@Head Crack,n/a--
pUnit:FullCastSpellOnTarget(9791,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1059', 20291, 1)
end

function Sorts_1059(pUnit, Event)
local choix_sorts_1059 = math.random(0, 1)
if choix_sorts_1059 == 0 then
pUnit:RegisterEvent('spell0_1059', 1, 1)
end
if choix_sorts_1059 == 1 then
pUnit:RegisterEvent('spell1_1059', 1, 1)
end
end

function mob1059_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1059', math.random(1500, 3000), 1)
end

function mob1059_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1059_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1059_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1059, 1, 'mob1059_Action')
RegisterUnitEvent(1059, 2, 'mob1059_Leave')
RegisterUnitEvent(1059, 3, 'mob1059_Kill')
RegisterUnitEvent(1059, 4, 'mob1059_Die')
